home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-17 | 13.5 KB | 329 lines | [TEXT/MPS ] |
- ;
- ; File: Finder.a
- ;
- ; Contains: Finder flags and container types.
- ;
- ; Version: Technology: Mac OS 8.1
- ; Release: Universal Interfaces 3.2
- ;
- ; Copyright: © 1990-1998 by Apple Computer, Inc., all rights reserved
- ;
- ; Bugs?: For bug reports, consult the following page on
- ; the World Wide Web:
- ;
- ; http://developer.apple.com/bugreporter/
- ;
- ;
- IF &TYPE('__FINDER__') = 'UNDEFINED' THEN
- __FINDER__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
-
- ; Creator and type of clipping files
-
- kClippingCreator EQU 'drag'
- kClippingPictureType EQU 'clpp'
- kClippingTextType EQU 'clpt'
- kClippingSoundType EQU 'clps'
- kClippingUnknownType EQU 'clpu'
-
- ; Creator and type of Internet Location files
-
- kInternetLocationCreator EQU 'drag'
- kInternetLocationHTTP EQU 'ilht'
- kInternetLocationFTP EQU 'ilft'
- kInternetLocationFile EQU 'ilfi'
- kInternetLocationMail EQU 'ilma'
- kInternetLocationNNTP EQU 'ilnw'
- kInternetLocationAFP EQU 'ilaf'
- kInternetLocationAppleTalk EQU 'ilat'
- kInternetLocationGeneric EQU 'ilge'
-
-
-
- kCustomIconResource EQU -16455 ; Custom icon family resource ID
- ; In order to specify any of the information described in the
- ; CustomBadgeResource data structure you must clear the kExtendedFlagsAreInvalid
- ; and set kExtendedFlagHasCustomBadge of the FXInfo.fdXFlags or DXInfo.frXFlags field,
- ; and add a resource of type kCustomBadgeResourceType and ID kCustomBadgeResourceID to
- ; the file or to the "Icon/n" file for a folder
-
- kCustomBadgeResourceType EQU 'badg'
- kCustomBadgeResourceID EQU -16455
- kCustomBadgeResourceVersion EQU 0
- CustomBadgeResource RECORD 0
- version ds.w 1 ; offset: $0 (0) ; This is version kCustomBadgeResourceVersion
- customBadgeResourceID ds.w 1 ; offset: $2 (2) ; If not 0, the ID of a resource to use on top
- ; of the icon for this file or folder
- customBadgeType ds.l 1 ; offset: $4 (4) ; If not 0, the type and creator of an icon
- customBadgeCreator ds.l 1 ; offset: $8 (8) ; to use on top of the icon
- windowBadgeType ds.l 1 ; offset: $C (12) ; If not 0, the type and creator of an icon
- windowBadgeCreator ds.l 1 ; offset: $10 (16) ; to display in the header of the window for this
- ; file or folder
- overrideType ds.l 1 ; offset: $14 (20) ; If not 0, the type and creator of an icon to
- overrideCreator ds.l 1 ; offset: $18 (24) ; use INSTEAD of the icon for this file or folder
- sizeof EQU * ; size: $1C (28)
- ENDR
- ; typedef struct CustomBadgeResource * CustomBadgeResourcePtr
-
- ; typedef CustomBadgeResourcePtr * CustomBadgeResourceHandle
-
- ; You can specify routing information for a file by including a 'rout' 0
- ; resource in it and setting the kExtendedFlagHasRoutingInfo bit in the extended
- ; Finder flags.
- ; The 'rout' resource is an array of RoutingResourceEntry. Each entry is considered
- ; in turn. The first matching entry is used.
- ; If the creator and fileType match the file being dropped and targetFolder match
- ; the folder ID of the folder being dropped onto, then the file is rerouted
- ; into the specified destination folder.
- ; The only target folder currently supported is the system folder,
- ; kSystemFolderType = 'macs'.
- ;
-
-
- kRoutingResourceType EQU 'rout'
- kRoutingResourceID EQU 0
- RoutingResourceEntry RECORD 0
- creator ds.l 1 ; offset: $0 (0) ; Use '****' or 0 to match any creator
- fileType ds.l 1 ; offset: $4 (4) ; Use '****' or 0 to match any file type
- targetFolder ds.l 1 ; offset: $8 (8) ; Folder ID of the folder this file was dropped onto
- destinationFolder ds.l 1 ; offset: $C (12) ; Folder that the source will be routed to
- reserved ds.l 1 ; offset: $10 (16) ; Set to 0
- sizeof EQU * ; size: $14 (20)
- ENDR
- ; typedef struct RoutingResourceEntry * RoutingResourcePtr
-
- ; typedef RoutingResourcePtr * RoutingResourceHandle
-
-
- ; Types for special container aliases
-
- kContainerFolderAliasType EQU 'fdrp' ; type for folder aliases
- kContainerTrashAliasType EQU 'trsh' ; type for trash folder aliases
- kContainerHardDiskAliasType EQU 'hdsk' ; type for hard disk aliases
- kContainerFloppyAliasType EQU 'flpy' ; type for floppy aliases
- kContainerServerAliasType EQU 'srvr' ; type for server aliases
- kApplicationAliasType EQU 'adrp' ; type for application aliases
- kContainerAliasType EQU 'drop' ; type for all other containers
- kDesktopPrinterAliasType EQU 'dtpa' ; type for Desktop Printer alias
- kContainerCDROMAliasType EQU 'cddr' ; type for CD-ROM alias
- ; Types for Special folder aliases
-
- kSystemFolderAliasType EQU 'fasy'
- kAppleMenuFolderAliasType EQU 'faam'
- kStartupFolderAliasType EQU 'fast'
- kPrintMonitorDocsFolderAliasType EQU 'fapn'
- kPreferencesFolderAliasType EQU 'fapf'
- kControlPanelFolderAliasType EQU 'fact'
- kExtensionFolderAliasType EQU 'faex'
- ; Types for AppleShare folder aliases
-
- kExportedFolderAliasType EQU 'faet'
- kDropFolderAliasType EQU 'fadr'
- kSharedFolderAliasType EQU 'fash'
- kMountedFolderAliasType EQU 'famn'
- ; Finder flags (finderFlags, fdFlags and frFlags)
- ; Any flag reserved or not specified should be set to 0.
- ; If a flag applies to a file, but not to a folder, make sure to check
- ; that the item is not a folder by checking ((ParamBlockRec.ioFlAttrib & ioDirMask) == 0)
-
- kIsOnDesk EQU $0001 ; Files and folders
- kColor EQU $000E ; Files and folders
- ; bit 0x0020 was kRequireSwitchLaunch, but is now reserved for future use
- kIsShared EQU $0040 ; Files only (Applications only)
- ; If clear, the application needs to write to
- ; its resource fork, and therefore cannot be
- ; shared on a server
- kHasNoINITs EQU $0080 ; Files only (Extensions/Control Panels only)
- ; This file contains no INIT resource
- kHasBeenInited EQU $0100 ; Files only
- ; Clear if the file contains desktop database
- ; resources ('BNDL', 'FREF', 'open', 'kind'...)
- ; that have not been added yet. Set only by the Finder
- ; bit 0x0200 was the letter bit for AOCE, but is now reserved for future use
- kHasCustomIcon EQU $0400 ; Files and folders
- kIsStationery EQU $0800 ; Files only
- kNameLocked EQU $1000 ; Files and folders
- kHasBundle EQU $2000 ; Files only
- kIsInvisible EQU $4000 ; Files and folders
- kIsAlias EQU $8000 ; Files only
- ; Obsolete. Use names defined above.
-
- fOnDesk EQU $0001
- fHasBundle EQU $2000
- fInvisible EQU $4000
- ; Obsolete
-
- fTrash EQU -3
- fDesktop EQU -2
- fDisk EQU 0
- IF OLDROUTINENAMES THEN
-
- kIsStationary EQU $0800
- ENDIF ; OLDROUTINENAMES
- ; Extended flags (extendedFinderFlags, fdXFlags and frXFlags)
- ; Any flag not specified should be set to 0.
-
- kExtendedFlagsAreInvalid EQU $8000 ; If set the other extended flags are ignored
- kExtendedFlagHasCustomBadge EQU $0100 ; Set if the file or folder has a badge resource
- kExtendedFlagHasRoutingInfo EQU $0004 ; Set if the file contains routing info resource
-
-
- ; Use this creation date to indicate that a file is temporarily busy
- ; (while it is being downloaded or installed for example)
- ; This will prevent the Finder from attempting to change attributes
- ; of the file until it is fully created.
-
- kMagicBusyCreationDate EQU $4F3AFDB0
-
- ; ------------------------------------------------------------------------
-
- ; The following data structures are binary compatible with FInfo, DInfo,
- ; FXInfo and DXInfo but represent the Mac OS 8 semantic of the fields.
- ; Use these data structures preferably to FInfo, etc...
-
-
- ; ------------------------------------------------------------------------
-
- FileInfo RECORD 0
- fileType ds.l 1 ; offset: $0 (0) ; The type of the file
- fileCreator ds.l 1 ; offset: $4 (4) ; The file's creator
- finderFlags ds.w 1 ; offset: $8 (8) ; ex: kHasBundle, kIsInvisible...
- location ds Point ; offset: $A (10) ; File's location in the folder
- ; If set to {0, 0}, the Finder will place the item automatically
- reserved ds.w 1 ; offset: $E (14) ; (set to 0)
- sizeof EQU * ; size: $10 (16)
- ENDR
- FolderInfo RECORD 0
- windowBounds ds Rect ; offset: $0 (0) ; The position and dimension of the folder's window
- finderFlags ds.w 1 ; offset: $8 (8) ; ex. kIsInvisible, kNameLocked, etc.
- location ds Point ; offset: $A (10) ; Folder's location in the parent folder
- ; If set to {0, 0}, the Finder will place the item automatically
- reserved ds.w 1 ; offset: $E (14) ; (set to 0)
- sizeof EQU * ; size: $10 (16)
- ENDR
- ExtendedFileInfo RECORD 0
- reserved ds.w 4 ; offset: $0 (0) ; Reserved (set to 0)
- extendedFinderFlags ds.w 1 ; offset: $8 (8) ; Extended flags (custom badge, routing info...)
- reserved2 ds.w 1 ; offset: $A (10) ; Reserved (set to 0). Comment ID if high-bit is clear
- putAwayFolderID ds.l 1 ; offset: $C (12) ; Put away folder ID
- sizeof EQU * ; size: $10 (16)
- ENDR
- ExtendedFolderInfo RECORD 0
- scrollPosition ds Point ; offset: $0 (0) ; Scroll position (for icon views)
- reserved ds.l 1 ; offset: $4 (4) ; Reserved (set to 0)
- extendedFinderFlags ds.w 1 ; offset: $8 (8) ; Extended flags (custom badge, routing info...)
- reserved2 ds.w 1 ; offset: $A (10) ; Reserved (set to 0). Comment ID if high-bit is clear
- putAwayFolderID ds.l 1 ; offset: $C (12) ; Put away folder ID
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; ------------------------------------------------------------------------
-
- ; The following data structures are here for compatibility.
- ; Use the new data structures replacing them if possible (i.e. FileInfo
- ; instead of FInfo, etc...)
-
-
- ; ------------------------------------------------------------------------
- ; File info
-
- ; IMPORTANT:
- ; In MacOS 8, the fdFldr field has become reserved for the Finder.
-
-
- FInfo RECORD 0
- fdType ds.l 1 ; offset: $0 (0) ; The type of the file
- fdCreator ds.l 1 ; offset: $4 (4) ; The file's creator
- fdFlags ds.w 1 ; offset: $8 (8) ; Flags ex. kHasBundle, kIsInvisible, etc.
- fdLocation ds Point ; offset: $A (10) ; File's location in folder.
- ; If set to {0, 0}, the Finder will place the item automatically
- fdFldr ds.w 1 ; offset: $E (14) ; Reserved (set to 0)
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; Extended file info
-
- ; IMPORTANT:
- ; In MacOS 8, the fdIconID and fdComment fields were changed
- ; to become reserved fields for the Finder.
- ; The fdScript has become an extended flag.
-
-
- FXInfo RECORD 0
- fdIconID ds.w 1 ; offset: $0 (0) ; Reserved (set to 0)
- fdReserved ds.w 3 ; offset: $2 (2) ; Reserved (set to 0)
- fdScript ds.b 1 ; offset: $8 (8) ; Extended flags. Script code if high-bit is set
- fdXFlags ds.b 1 ; offset: $9 (9) ; Extended flags
- fdComment ds.w 1 ; offset: $A (10) ; Reserved (set to 0). Comment ID if high-bit is clear
- fdPutAway ds.l 1 ; offset: $C (12) ; Put away folder ID
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; Folder info
-
- ; IMPORTANT:
- ; In MacOS 8, the frView field was changed to become reserved
- ; field for the Finder.
-
-
- DInfo RECORD 0
- frRect ds Rect ; offset: $0 (0) ; Folder's window bounds
- frFlags ds.w 1 ; offset: $8 (8) ; Flags ex. kIsInvisible, kNameLocked, etc.
- frLocation ds Point ; offset: $A (10) ; Folder's location in parent folder
- ; If set to {0, 0}, the Finder will place the item automatically
- frView ds.w 1 ; offset: $E (14) ; Reserved (set to 0)
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; Extended folder info
-
- ; IMPORTANT:
- ; In MacOS 8, the frOpenChain and frComment fields were changed
- ; to become reserved fields for the Finder.
- ; The frScript has become an extended flag.
-
-
- DXInfo RECORD 0
- frScroll ds Point ; offset: $0 (0) ; Scroll position
- frOpenChain ds.l 1 ; offset: $4 (4) ; Reserved (set to 0)
- frScript ds.b 1 ; offset: $8 (8) ; Extended flags. Script code if high-bit is set
- frXFlags ds.b 1 ; offset: $9 (9) ; Extended flags
- frComment ds.w 1 ; offset: $A (10) ; Reserved (set to 0). Comment ID if high-bit is clear
- frPutAway ds.l 1 ; offset: $C (12) ; Put away folder ID
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; Values of the 'message' parameter to a Control Panel 'cdev'
-
- initDev EQU 0 ;Time for cdev to initialize itself
- hitDev EQU 1 ;Hit on one of my items
- closeDev EQU 2 ;Close yourself
- nulDev EQU 3 ;Null event
- updateDev EQU 4 ;Update event
- activDev EQU 5 ;Activate event
- deactivDev EQU 6 ;Deactivate event
- keyEvtDev EQU 7 ;Key down/auto key
- macDev EQU 8 ;Decide whether or not to show up
- undoDev EQU 9
- cutDev EQU 10
- copyDev EQU 11
- pasteDev EQU 12
- clearDev EQU 13
- cursorDev EQU 14
-
- ; Special values a Control Panel 'cdev' can return
-
- cdevGenErr EQU -1 ;General error; gray cdev w/o alert
- cdevMemErr EQU 0 ;Memory shortfall; alert user please
- cdevResErr EQU 1 ;Couldn't get a needed resource; alert
- cdevUnset EQU 3 ; cdevValue is initialized to this
- ; Control Panel Default Proc
-
-
- ENDIF ; __FINDER__
-
-